package top.z.work.framework.auth.core;

import cn.dev33.satoken.stp.StpUtil;
import org.springframework.data.domain.AuditorAware;
import org.springframework.lang.NonNull;

import java.util.Optional;

public class DataAuditorAware implements AuditorAware<Long> {

    @NonNull
    @Override
    public Optional<Long> getCurrentAuditor() {
        Long loginUserId = StpUtil.getLoginId(-999L);
        return Optional.of(loginUserId);
    }
}
